STRIG Function ---------------------------------------------------------------------------- Action Returns the status of a joystick trigger. Syntax STRIG( n%) Remarks The STRIG function is used to test the joystick trigger status. The numeric expression n% is an unsigned integer between 0 and 7 that indicates the joystick and trigger to check. The following list describes the values returned by the STRIG( n%) function for different values of n%. ----------------------------------------------------------------------------- Value Returns ---------------------------------------------------------------------------- 0 -1 if the lower trigger on joystick A was pressed since the last STRIG(0) call, 0 if not. 1 -1 if the lower trigger on joystick A is currently down, 0 if not. 2 -1 if the lower trigger on joystick B was pressed since the last STRIG(2) call, 0 if not. 3 -1 if the lower trigger on joystick B is currently down, 0 if not. Value Returns ---------------------------------------------------------------------------- not. 4 -1 if the upper trigger on joystick A was pressed since the last STRIG(4) call, 0 if not. 5 -1 if the upper trigger on joystick A is currently down, 0 if not. 6 -1 if the upper trigger on joystick B was pressed since the last STRIG(6) call, 0 if not. 7 -1 if the upper trigger on joystick B is currently down, 0 if not. For more information on joystick-event trapping, see the entry for ON event. You cannot use the STRIG function inside a joystick-event trap because the trigger information used by the STRIG function will not be available for ON STRIG. In previous versions of BASIC, the statement STRIG ON enabled testing of the joystick triggers; STRIG OFF disabled joystick-trigger testing. The current version of BASIC ignores these statements. (The old STRIG ON and STRIG OFF statements are different from the STRIG( n%) ON, STRIG( n%) OFF, and STRIG( n%) STOP statements. The STRIG statements enable, disable, and inhibit trapping of joystick events.) Note The STRIG function is not available in OS-2 protected mode. See Also ON event, STRIG Statements Example See the STRIG statements programming example, which uses the STRIG function.